﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using DataMining.DataAccess;
using System.Data.SqlClient;
using DataMining.Bean;
using System.Data;
using DopWebService.intelray.webservice;
using DopWebService;

using DataMining.Control.Transport;

namespace DataMining
{
    /// <summary>
    /// Interaction logic for Window1.xaml
    /// </summary>
    public partial class Window1 : Window
    {
        public Window1()
        {
            InitializeComponent();
        }

        //病人信息表
        private void button1_Click(object sender, RoutedEventArgs e)
        {
            //DopService s = new DopService();
            //s.Url = "http://192.168.10.228:8080/DopWebService/services/DopService?wsdl";

            //DopServiceHelp help = new DopServiceHelp(s);

            DateTime end_time;
            DateTime start_time = DateTime.Now;
            TransporByTable trans = new TransporByTable();

            trans.Patient_Information_TransByDB();
            end_time= DateTime.Now;
            TimeSpan t3 = end_time - start_time;
      
            MessageBox.Show("存入患者信息表条！ 用时"+t3.ToString());
        }

        //门诊记录表
        private void button2_Click(object sender, RoutedEventArgs e)
        {
            //DopService s = new DopService();
            //s.Url = "http://192.168.10.228:8080/DopWebService/services/DopService?wsdl";

            //DopServiceHelp help = new DopServiceHelp(s);
            DateTime end_time;
            DateTime start_time = DateTime.Now;
            TransporByTable trans = new TransporByTable();

            trans.OutPatient_Record_TransByDB();

            end_time = DateTime.Now;
            TimeSpan t3 = end_time - start_time;

            MessageBox.Show("存入门诊记录表条！ 用时" + t3.ToString());
        }


        //住院记录表
        private void button3_Click(object sender, RoutedEventArgs e)
        {
            //DopService s = new DopService();
            //s.Url = "http://192.168.10.228:8080/DopWebService/services/DopService?wsdl";

            //DopServiceHelp help = new DopServiceHelp(s);
            DateTime end_time;
            DateTime start_time = DateTime.Now;
            TransporByTable trans = new TransporByTable();

            trans.InPatient_Record_TransByDB();

            end_time = DateTime.Now;
            TimeSpan t3 = end_time - start_time;

            MessageBox.Show("存入住院记录表条！ 用时" + t3.ToString());
        }

        //门诊医嘱明细表
        private void button4_Click(object sender, RoutedEventArgs e)
        {
            //DopService s = new DopService();
            //s.Url = "http://192.168.10.228:8080/DopWebService/services/DopService?wsdl";

            //DopServiceHelp help = new DopServiceHelp(s);
            DateTime end_time;
            DateTime start_time = DateTime.Now;
            TransporByTable trans = new TransporByTable();

            trans.Outpatient_DrAdvice_Detail_TransByDB();

            end_time = DateTime.Now;
            TimeSpan t3 = end_time - start_time;

            MessageBox.Show("存入门诊医嘱明细表条！ 用时" + t3.ToString());
        }



        //住院医嘱明细表
        private void button5_Click(object sender, RoutedEventArgs e)
        {
            DateTime end_time;
            DateTime start_time = DateTime.Now;
            TransporByTable trans = new TransporByTable();

            trans.Inpatient_DrAdvice_Detail_TransByDB();

            end_time = DateTime.Now;
            TimeSpan t3 = end_time - start_time;

            MessageBox.Show("存入住院医嘱明细表条！ 用时" + t3.ToString());
        }

        //门诊收费结算表
        private void button6_Click(object sender, RoutedEventArgs e)
        {
            DateTime end_time;
            DateTime start_time = DateTime.Now;
            TransporByTable trans = new TransporByTable();

            trans.Outpatient_Fee_Settle_TransByDB(); 

            end_time = DateTime.Now;
            TimeSpan t3 = end_time - start_time;

            MessageBox.Show("门诊收费结算表！ 用时" + t3.ToString());
        }

        //住院收费结算表
        private void button7_Click(object sender, RoutedEventArgs e)
        {
            DateTime end_time;
            DateTime start_time = DateTime.Now;
            TransporByTable trans = new TransporByTable();

            trans.Inpatient_Fee_Settle_TransByDB();
            end_time = DateTime.Now;
            TimeSpan t3 = end_time - start_time;

            MessageBox.Show("住院收费结算表！ 用时" + t3.ToString());
        }

        //门诊收费明细表
        private void button8_Click(object sender, RoutedEventArgs e)
        {
            DateTime end_time;
            DateTime start_time = DateTime.Now;
            TransporByTable trans = new TransporByTable();

            trans.Outpatient_Fee_Detail_TransByDB();
            end_time = DateTime.Now;
            TimeSpan t3 = end_time - start_time;

            MessageBox.Show("门诊收费明细表！ 用时" + t3.ToString());
        }

        //住院收费明细表
        private void button9_Click(object sender, RoutedEventArgs e)
        {
            DateTime end_time;
            DateTime start_time = DateTime.Now;
            TransporByTable trans = new TransporByTable();

            trans.Inpatient_Fee_Settle_TransByDB();
            end_time = DateTime.Now;
            TimeSpan t3 = end_time - start_time;

            MessageBox.Show("住院收费明细表！ 用时" + t3.ToString());
        }


        //结算费别表
        private void button10_Click(object sender, RoutedEventArgs e)
        {
            DateTime end_time;
            DateTime start_time = DateTime.Now;
            TransporByTable trans = new TransporByTable();

            trans.Settle_Fee_Type_TransByDB();
            end_time = DateTime.Now;
            TimeSpan t3 = end_time - start_time;

            MessageBox.Show("住院收费明细表！ 用时" + t3.ToString());
        }

        //检验报告单
        private void button11_Click(object sender, RoutedEventArgs e)
        {
            DateTime end_time;
            DateTime start_time = DateTime.Now;
            TransporByTable trans = new TransporByTable();

            trans.LIS_Report_TransByDB();
            end_time = DateTime.Now;
            TimeSpan t3 = end_time - start_time;

            MessageBox.Show("住院收费明细表！ 用时" + t3.ToString());
        }

        //检验指标表
        private void button12_Click(object sender, RoutedEventArgs e)
        {
            DateTime end_time;
            DateTime start_time = DateTime.Now;
            TransporByTable trans = new TransporByTable();

            trans.LIS_Indicators_TransByDB();
            end_time = DateTime.Now;
            TimeSpan t3 = end_time - start_time;

            MessageBox.Show("检验指标表！ 用时" + t3.ToString());
        }

        //住院病历主表
        private void button13_Click(object sender, RoutedEventArgs e)
        {
            DateTime end_time;
            DateTime start_time = DateTime.Now;
            TransporByTable trans = new TransporByTable();

            trans.CIS_Main_TransByDB();
            end_time = DateTime.Now;
            TimeSpan t3 = end_time - start_time;

            MessageBox.Show("住院病历主表！ 用时" + t3.ToString());
        }

        //住院病历手术明细表
        private void button14_Click(object sender, RoutedEventArgs e)
        {
            DateTime end_time;
            DateTime start_time = DateTime.Now;
            TransporByTable trans = new TransporByTable();

            trans.CIS_Operation_Detail_TransByDB();
            end_time = DateTime.Now;
            TimeSpan t3 = end_time - start_time;

            MessageBox.Show("住院病历手术明细表！ 用时" + t3.ToString());
        }
    }
}
